setwd("D:/作业/R语言/data for class3")
a=read.table("ADdata1.txt")
b=read.csv("ADdata2.csv")
c=read.xlsx("ADdata3.xlsx")
d=read.table("ADdata4.txt")
s=merge(a,b,by.x = "row.names",by.y = "X") 
w=merge(c,d,by.x = 1,by.y = "row.names")
x=merge(s,w,by.x = 1,by.y = 1)
write.table(x,file = "x.txt")
write.csv(x,file = "x.csv")
